Skip to content

replay: fix stem burst violations#8930

Open
yufeng-jump wants to merge 1 commit intomainfrom
yufeng/eviction-burst
Open

replay: fix stem burst violations#8930
yufeng-jump wants to merge 1 commit intomainfrom
yufeng/eviction-burst

Conversation

@yufeng-jump
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 16, 2026 23:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the replay tile’s handling of FEC ingestion and bank-frontier eviction to prevent “stem burst” violations by bounding the amount of work performed per after_credit iteration.

Changes:

  • Change insert_fec_set to return an int status so callers can stop backfill once a bank is marked dead.
  • Track frontier eviction victims in fd_replay_tile_t (victim_bank_indices/victim_bank_cnt) and evict them incrementally instead of in a single loop.
  • Update backfill logic in process_fec_set to stop inserting further FEC sets when an insertion marks the bank dead.
Comments suppressed due to low confidence (1)

src/discof/replay/fd_replay_tile.c:2061

  • insert_fec_set now returns int but can fall through to the end of the function without returning a value (successful ingest path after the store lock). This is undefined behavior and will typically trigger -Wreturn-type. Ensure the function returns a value on all paths (e.g., return 0 on the non-dead/success path after the lock block).
  } FD_STORE_SLOCK_END;

  ctx->metrics.store_query_release++;
  fd_histf_sample( ctx->metrics.store_query_work, (ulong)fd_log_wallclock() - work );
}

You can also share your feedback on Copilot code review. Take the survey.

@yufeng-jump yufeng-jump force-pushed the yufeng/eviction-burst branch from 5bffa5f to 5339cc0 Compare March 17, 2026 00:00
Copilot AI review requested due to automatic review settings March 17, 2026 00:05
@yufeng-jump yufeng-jump force-pushed the yufeng/eviction-burst branch from 5339cc0 to dc04011 Compare March 17, 2026 00:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to mitigate replay “stem burst violations” by spreading out high-cost eviction/ingestion work across credits and by stopping backfill ingestion early once a block is detected as dead.

Changes:

  • Make insert_fec_set() return a status (dead vs not-dead) and stop backfill ingestion once a block is marked dead.
  • Replace “evict all frontier banks in one credit” with a deferred victim list (victim_bank_indices / victim_bank_cnt) and evict one victim per credit in after_credit().
  • Initialize new replay-tile eviction state (victim_bank_cnt) during unprivileged init.

You can also share your feedback on Copilot code review. Take the survey.

fd_txncache_t * txncache;
fd_store_t * store;
fd_banks_t banks[1];
ulong victim_bank_indices[ FD_BANKS_MAX_BANKS ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you call this something else

@yufeng-jump yufeng-jump force-pushed the yufeng/eviction-burst branch from dc04011 to 803489f Compare March 17, 2026 18:42
@yufeng-jump yufeng-jump enabled auto-merge (squash) March 17, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants